<%--
  Created by IntelliJ IDEA.
  User: root
  Date: 5/10/17
  Time: 10:19 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<style type="text/css">
    #local-books-trees {
        min-width: 220px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0px;
        float: left;
    }

    .col-md-12 {
        padding-left: 0px;
    }

    .col-md-7 {
        padding-left: 0px;
    }
</style>
<!-- 页面标题 -->
<div class="pageheader">
    <div class="media">
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href="javascript:;"><span class="glyphicon glyphicon_menu_books_page"></span>图书</a></li>
                <li class="active">图书分类管理</li>
            </ul>
        </div>
    </div>
</div>
<!-- End 页面标题 -->

<!-- 页面内容 -->
<div class="contentpanel" ng-controller="BookClassificationCtrl" ng-cloak style="overflow:auto;">

    <!-- 工具栏 -->
    <div class="media-options toolwrapper">

        <div class="media-options toolwrapper col-md-12">
            <div class="pull-left" id="device_btns">
                <button type="button" class="btn btn-primary" ng-click="openAddBookTypeModal()" style="width:120px;">添加
                </button>
            </div>
            <div class="pull-right">
                <form class="form form-search" action="">
                    <input id="searchInput" type="search" class="form-control" placeholder="按name搜索" ng-model="qualifier"
                           ng-keyup="searchBookType()">
                </form>
            </div>
        </div>
        <div class="toolwrapper col-md-12" id="device_operate_tools">

        </div>
        <!-- pull-right -->
    </div>

    <!-- End 工具栏 -->
    <!-- 设备管控主页面 -->
    <div class="row">
        <!-- 用户信息 -->
        <div class="col-md-12 mapwrapper" id="map-div" style="padding-right:0px;">
            <table ng-table="bookTypeTableParams" class="table table-striped table-bordered table-hover ng-table-responsive"
                   ng-pagination="test.html"><!-- ng-pagination="test.html" -->
                <tr ng-repeat="item in $data">
                    <td header="'ng-table/headers/checkbox.html'">
                        <div class="ckbox ckbox-primary pull-left">
                            <input type="checkbox" id="{{item.id}}" ng-model="item.selected"
                                   ng-change="changeSelected(item)">
                            <label for="{{item.id}}"></label>
                        </div>
                    </td>
                    <td data-title="'分类名称'" sortable="'classificationName'">{{item.classificationName}}
                    </td>
                    <td data-title="'添加时间'" sortable="'createtime'">{{item.createtime}}
                    </td>

                    <td data-title="'操作'">
                        <button id="unset-admin-btn" type="button"
                                class="btn btn-primary btn-xs" ng-click="openEditBookTypeModal(item)"
                                style="width:48px;height:24px;">
                            <i class="fa fa-trash-o"></i>编辑
                        </button>
                        <button type="button" class="btn btn-danger btn-sm" ng-click="openDelBookTypeModal(item)">删除</button>
                    </td>
                </tr>
            </table>
            <tm-pagination conf="paginationConf"></tm-pagination>
        </div>
    </div>
    <!-- eng 用户信息 -->
</div>
<!-- End 页面内容 -->
<script type="text/ng-template" id="bookTypeModal.html">
    <jsp:include page="partical/bookTypeModal.jsp"></jsp:include>
</script>

<script type="text/ng-template" id="delBookTypeModal.html">
    <div class="modal-header">
        <h4 class="modal-title" id="myModalLabel">删除图书分类</h4>
    </div>
    <div class="modal-body form-horizontal text-center">
        <div class="form-group">
            <span class="glyphicon glyphicon-warning-sign btn-lg"></span>确定删除分类？
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default"  ng-click="cancel()">取消</button>
        <button type="button" class="btn btn-primary"  ng-click="ok()">确定</button>
    </div>

</script>

<script type="text/ng-template" id="ng-table/headers/checkbox.html">
    <div class="ckbox ckbox-primary pull-left">
        <input type="checkbox" ng-model="allSelected" ng-change="toggleAllSelected()" id="allSelected">
        <label for="allSelected"></label>
    </div>
</script>
